#!/usr/bin/env bash
#docker rm -vf $(docker ps -q -f status=created) & docker rm -vf $(docker ps -q -f status=exited)

if docker ps -q -f 'status=created'; then
   docker rm -vf $(docker ps -q -f status=created)
fi
if docker ps -q -f 'status=exited'; then
   docker rm -vf $(docker ps -q -f status=exited)
fi

if docker ps -a | grep -i 'demo'; then
   docker stop 'demo'
fi
if docker ps -a | grep -i 'demo'; then
   docker rm 'demo'
fi

if docker images -a | grep -i '192.168.4.183:5000/lychee/test:666'; then
   docker rmi -f '192.168.4.183:5000/lychee/test:666'
fi